package com.zqxq.lottery.entity.o2o.esports;

import com.zqxq.common.utils.DispatcherUtils;
import com.zqxq.lottery.entity.po.esports.ESportsPlaywayPO;
import com.zqxq.lottery.entity.vo.esports.ESportsPlaywayVO;

public class ESportsPlaywayO2O {

    public static ESportsPlaywayVO toVO(ESportsPlaywayPO po) {
        if (po == null) {
            return null;
        }
        ESportsPlaywayVO eSportsPlaywayVO = new ESportsPlaywayVO();
        eSportsPlaywayVO.setId(DispatcherUtils.parseString(po.getId()));
        eSportsPlaywayVO.setMatchId(DispatcherUtils.parseString(po.getMatch_id()));
        eSportsPlaywayVO.setPlayId(DispatcherUtils.parseString(po.getPlay_id()));
        eSportsPlaywayVO.setStatus(DispatcherUtils.parseString(po.getStatus()));
        eSportsPlaywayVO.setBetStatus(DispatcherUtils.parseString(po.getBet_status()));
        eSportsPlaywayVO.setPlayDescribe(po.getPlay_describe());
        eSportsPlaywayVO.setHandicap(po.getHandicap());
        eSportsPlaywayVO.setHandicapTeam(DispatcherUtils.parseString(po.getHandicap_team()));
        eSportsPlaywayVO.setRound(po.getRound());
        eSportsPlaywayVO.setPlayOdds(po.getPlay_odds());
        eSportsPlaywayVO.setPlayType(DispatcherUtils.parseString(po.getPlay_type()));
        eSportsPlaywayVO.setResult(DispatcherUtils.parseString(po.getResult()));
        eSportsPlaywayVO.setScore(po.getScore());
        eSportsPlaywayVO.setShowScore(DispatcherUtils.parseString(po.getShow_score()));
        eSportsPlaywayVO.setMatchTime(DispatcherUtils.parseDateTimeStr(po.getMatch_time()));
        eSportsPlaywayVO.setCloseTime(DispatcherUtils.parseDateTimeStr(po.getClose_time()));
        eSportsPlaywayVO.setCreateTime(DispatcherUtils.parseDateTimeStr(po.getCreate_time()));
        eSportsPlaywayVO.setUpdateTime(DispatcherUtils.parseDateTimeStr(po.getUpdate_time()));
        eSportsPlaywayVO.setPlayName(po.getPlay_name());
        return eSportsPlaywayVO;
    }

    public static ESportsPlaywayPO toPO(ESportsPlaywayVO vo) {
        if (vo == null) {
            return null;
        }
        ESportsPlaywayPO eSportsPlaywayPO = new ESportsPlaywayPO();
        eSportsPlaywayPO.setId(DispatcherUtils.parseLong(vo.getId()));
        eSportsPlaywayPO.setMatch_id(DispatcherUtils.parseLong(vo.getMatchId()));
        eSportsPlaywayPO.setPlay_id(DispatcherUtils.parseLong(vo.getPlayId()));
        eSportsPlaywayPO.setStatus(DispatcherUtils.parseInteger(vo.getStatus()));
        eSportsPlaywayPO.setBet_status(DispatcherUtils.parseInteger(vo.getBetStatus()));
        eSportsPlaywayPO.setPlay_describe(vo.getPlayDescribe());
        eSportsPlaywayPO.setHandicap(vo.getHandicap());
        eSportsPlaywayPO.setHandicap_team(DispatcherUtils.parseInteger(vo.getHandicapTeam()));
        eSportsPlaywayPO.setRound(vo.getRound());
        eSportsPlaywayPO.setPlay_odds(vo.getPlayOdds());
        eSportsPlaywayPO.setPlay_type(DispatcherUtils.parseInteger(vo.getPlayType()));
        eSportsPlaywayPO.setResult(DispatcherUtils.parseInteger(vo.getResult()));
        eSportsPlaywayPO.setScore(vo.getScore());
        eSportsPlaywayPO.setShow_score(DispatcherUtils.parseInteger(vo.getShowScore()));
        eSportsPlaywayPO.setMatch_time(DispatcherUtils.parseDateTime(vo.getMatchTime()));
        eSportsPlaywayPO.setClose_time(DispatcherUtils.parseDateTime(vo.getCloseTime()));
        eSportsPlaywayPO.setCreate_time(DispatcherUtils.parseDateTime(vo.getCreateTime()));
        eSportsPlaywayPO.setUpdate_time(DispatcherUtils.parseDateTime(vo.getUpdateTime()));
        return eSportsPlaywayPO;
    }
}
